import request from '@/utils/request'

// 排产任务时获取工单信息
// 输入工单单号与工单单别查询信息
export function orderInfo(params) {
  return request({
    params,
    url: '/back/workOrderPlan/getOrderByNo',
    method: 'post'
  })
}

// 添加一条排产记录
export function addOrderPlan(params) {
  return request({
    params,
    url: '/back/workOrderPlan/saveOrder',
    method: 'post'
  })
}

// 获取排产信息列表
export function getOrderList(params) {
  return request({
    params,
    url: '/back/workOrderPlan/getOrderPage',
    method: 'post'
  })
}

// 物流上传文件
export function logisticsIns(params) {
  return request({
    params,
    url: 'back/logistics-data/ins',
    method: 'post'
  })
}

// 修改工单信息
export function changeOrderInfo(params) {
  return request({
    params,
    url: '/back/workOrderPlan/updateOrder',
    method: 'post'
  })
}

// 工段编号下拉列表
export function getSectionList(params) {
  return request({
    params,
    url: '/back/sectionInfo/getSectionList',
    method: 'get'
  })
}

// 计划批号获取所有工单
export function getOrderByNoSK(params) {
  return request({
    params,
    url: '/back/workOrderPlan/getOrderByNoSK',
    method: 'post'
  })
}
// 查询创建的临技
export function findLinJi(params) {
  return request({
    params,
    url: '/device/findLinJi',
    method: 'post'
  })
}
// 计划排产创建临技
export function saveLinJi(params) {
  return request({
    params,
    url: '/device/saveLinJi',
    method: 'post'
  })
}
// 删除创建的临技
export function delLinJi(params) {
  return request({
    params,
    url: '/device/delLinJi',
    method: 'post'
  })
}

// 数控入库
export function moctfadd(params) {
  return request({
    params,
    url: '/moctf/add',
    method: 'post'
  })
}
// 喷涂入库
export function ptWorkOrderInWarehouse(data) {
  return request({
    data,
    url: '/moctf/ptWorkOrderInWarehouse',
    method: 'post'
  })
}
// 批量排产，焊喷车间工单区分焊接、喷涂
export function findValidTechnologyNo(params) {
  return request({
    params,
    url: '/device/NumericalControl/findValidTechnologyNo',
    method: 'post'
  })
}

// 喷涂排产，添加一条排产记录
export function saveOrderPt(params) {
  return request({
    params,
    url: 'back/workOrderPlan/saveOrderPt',
    method: 'post'
  })
}

// 喷涂，计划批号获取所有工单
export function getOrderByNoPT(params) {
  return request({
    params,
    url: '/back/workOrderPlan/getOrderByNoPT',
    method: 'post'
  })
}
